from dfa import core, simulator, parser

dfa = core.DFA(name="myDFA")
dfa.add_state("q0")
dfa.add_state("q1")
dfa.add_state("x")

dfa.add_transition("x","q0", "0", "1")
dfa.add_transition("x","q1", "1", "0")
dfa.add_transition("q0","q1", "0", "1")
dfa.add_transition("q0","q1", "1", "0")
dfa.add_transition("q1","q1", "0", "0")
dfa.add_transition("q1","q0", "1", "1")

dfa.set_init("x")
sim = simulator.Simulator(dfa)
#print sim.print_cycle_func()
print parser.write_dot(dfa)
